:- module(basic_types, 
        [
            date/1,
            language/1,
            null/1,
	    functor_arity/1
        ], [assertions,basicmodes,regtypes]).


:- comment(title, "Basic types").
:- comment(subtitle, "AMOS Project").


:- comment(author, "Manuel Carro and the CLIP Group").
:- comment(author, "Facultad de Inform@'{a}tica").
:- comment(author, "Universidad Polit@'{e}cnica de Madrid").
:- comment(author, "@tt{clip@@dia.fi.upm.es}").
:- comment(author, "@tt{http://www.clip.dia.fi.upm.es/}").

:- comment(module, "

This module contains basic types used in the database access
and ontology handling. 

@include{../Doc/acknowledgements.lpdoc}
").

:- regtype date(?Date) # "@var{Date} is a date.".

%jcfdate(date(Day, Month, Year)):-
%jcf        int(Day), 
%jcf        int(Month),
%jcf        int(Year).
date(Date):-
%	string(Date).    %%%IMPORTANT!!!! Strings represented as ATOMS!!!
	atom(Date).

:- regtype language(?LangDesc) 

# "@var{LangDesc} is a valid language descriptor.  It consists of a
pair @tt{lang(String, LangCode)}, where @tt{String} is a
human-readable language name and @tt{LangCode} is an atom
corresponding to the (standard) coding of languages:

@includedef{language/1}

".

language(lang("English", 'EN')).
language(lang("Spanish", 'SP')).
language(lang("French", 'FR')).
language(lang("German", 'DE')).


:- regtype pair(+Pair)

# "@var{Pair} is a dash-separated pair of ground terms.".

pair(A-B):- ground(A), ground(B).



:- regtype null(?Null)

# "@var{Null} is an atom recognized as the @tt{null} value by the
database interface.".

null('$null$').

:- regtype functor_arity(?Decl) # "@var{Decl} is a structure declaration
   of the form @tt{name/arity}.".

functor_arity(_Name/_Arity).


:- comment(version_maintenance,on).

:- comment(version(0*1+1,2003/03/26,19:29*34+'CET'), "functor/arity
   declaration added (Jesus Correas Fernandez)").

:- comment(version(0*1+0,2003/02/13,20:48*43+'CET'), "Initial version,
with all interfaces included.  (Manuel Carro)").

